package com.example.hcd.datamanage;
//付款数据管理

import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;

import android.content.Context;
import android.graphics.Bitmap;
import android.widget.Toast;

public class PaymentData{
	//
	private Context context;
	//业务ID
	private String id;
	//发布时间
	private String actionTime;
	//付款时间
	private String purchaseTime;
	//内容标题
	private String title;
	//付款类型
	private String type;
	//付款类型名称
	private String typeName;
	//付款金额
	private BigDecimal amount = new BigDecimal(0);
	//收款单位
	private String gatheringManName;
	//收款单位ID
	private String gatheringManId;
	//收款银行单位
	private String bankName;
	//收款单位银行账号
	private String bankCardId;
	//税号
	private String taxNumber;
	//付款理由
	private String reason;
	//单据凭证
	private Bitmap[] bitmaps;
	//流程ID
	private String processId;
	//文件列表
	private ArrayList<ImageFileType> imageList = new ArrayList<ImageFileType>();
	//流程申请人
	private String applicant;
	//流程状态
	private String processStatus;
	//流程状态Id
	private String processStatusId;
	//申请人ID
	private String applyPeopleId;
	//任务ID
	private String taskId;
	//申请人部门
	private String DeptName;
	
	//是否有发票
	private String ishasReceipt;
		
	private String fileName;
	
	private String imgPrefix;
	
	
	
	public String getImgPrefix()
	{
		return imgPrefix;
	}
	public void setImgPrefix(String imgPrefix)
	{
		this.imgPrefix = imgPrefix;
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getActionTime() {
		SimpleDateFormat mFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm");
		long time = Long.parseLong(actionTime);
		return mFormat.format(new Date(time));
	}
	public void setActionTime(String actionTime) {
		this.actionTime = actionTime;
	}
	public String getPurchaseTime() {
		SimpleDateFormat mFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm");
		long time = Long.parseLong(purchaseTime);
		return mFormat.format(new Date(time));
	}
	public void setPurchaseTime(String purchaseTime) {
		this.purchaseTime = purchaseTime;
	}
	public String getGatheringManName() {
		return gatheringManName;
	}
	public void setGatheringManName(String gatheringManName) {
		this.gatheringManName = gatheringManName;
	}
	public String getBankName() {
		return bankName;
	}
	public void setBankName(String bankName) {
		this.bankName = bankName;
	}
	public String getBankCardId() {
		return bankCardId;
	}
	public void setBankCardId(String bankCardId) {
		this.bankCardId = bankCardId;
	}
	public String getTaxNumber() {
		return taxNumber;
	}
	public void setTaxNumber(String taxNumber) {
		this.taxNumber = taxNumber;
	}
	public String getReason() {
		return reason;
	}
	public void setReason(String reason) {
		this.reason = reason;
	}
	public Bitmap[] getBitmaps() {
		return bitmaps;
	}
	public void setBitmaps(Bitmap[] bitmaps) {
		this.bitmaps = bitmaps;
	}
	
	public PaymentData(Context context)
	{
		this.context = context;
	}
	
	public boolean isCanPost()
	{
		if(getTitle() == null)
		{
			Toast.makeText(context,"标题不能为空", Toast.LENGTH_SHORT).show();
			return false;
		}else if(getType() == null)
		{
			Toast.makeText(context,"付款类型不能为空", Toast.LENGTH_SHORT).show();
			return false;
		}else if(getAmount() == null)
		{
			Toast.makeText(context,"金额不能为空", Toast.LENGTH_SHORT).show();
			return false;
		}else if(bankName == null)
		{
			Toast.makeText(context,"开户银行不能为空", Toast.LENGTH_SHORT).show();
			return false;
		}else if(bankCardId == null)
		{
			Toast.makeText(context,"银行账号不能为空", Toast.LENGTH_SHORT).show();
			return false;
		}else if(gatheringManName == null)
		{
			Toast.makeText(context,"收款单位不能为空", Toast.LENGTH_SHORT).show();
			return false;
		}
		return true;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public BigDecimal getAmount() {
		return amount;
	}
	public void setAmount(BigDecimal amount) {
		this.amount = amount;
	}
	public String getProcessId() {
		return processId;
	}
	public void setProcessId(String processId) {
		this.processId = processId;
	}
	public String getFileName() {
		return fileName;
	}
	public void setFileName(String fileName) {
		this.fileName = fileName;
	}
	public String getApplicant() {
		return applicant;
	}
	public void setApplicant(String applicant) {
		this.applicant = applicant;
	}
	public String getProcessStatus() {
		return processStatus;
	}
	public void setProcessStatus(String processStatus) {
		this.processStatus = processStatus;
	}
	public String getApplyPeopleId() {
		return applyPeopleId;
	}
	public void setApplyPeopleId(String applyPeopleId) {
		this.applyPeopleId = applyPeopleId;
	}
	public String getTaskId() {
		return taskId;
	}
	public void setTaskId(String taskId) {
		this.taskId = taskId;
	}
	public String getDeptName() {
		return DeptName;
	}
	public void setDeptName(String deptName) {
		DeptName = deptName;
	}
	public String getGatheringManId() {
		return gatheringManId;
	}
	public void setGatheringManId(String gatheringManId) {
		this.gatheringManId = gatheringManId;
	}
	public String getProcessStatusId() {
		return processStatusId;
	}
	public void setProcessStatusId(String processStatusId) {
		this.processStatusId = processStatusId;
	}
	public ArrayList<ImageFileType> getImageList() {
		return imageList;
	}
	public void setImageList(ArrayList<ImageFileType> imageList) {
		this.imageList = imageList;
	}
	public String getTypeName() {
		return typeName;
	}
	public void setTypeName(String typeName) {
		this.typeName = typeName;
	}
	public String getIshasReceipt() {
		return ishasReceipt;
	}
	public void setIshasReceipt(String ishasReceipt) {
		this.ishasReceipt = ishasReceipt;
	}
	

}
